//
//  KKNetworkRequest.m
//  Questionnaire
//
//  Created by leo on 16/1/24.
//  Copyright © 2016年 leo. All rights reserved.
//

#import "KKNetworkRequest.h"

@implementation KKNetworkRequest

- (instancetype)init {
    self = [super init];
    if (self) {
        
//#ifdef DEBUG
//        self.requestURL = @"http://116.236.132.187:82/fangxuntong/rest/fxt";
//#else
//        self.requestURL = @"https://onsite.huaxiadnb.cn/admin/logic/IOSAndroidDataService.ashx";
//#endif
        
        self.requestURL = @"http://182.254.139.183:800";
        
        self.showAlert = true;
    }
    return self;
}

- (NSData*)postData {
    
    if (_requestParmeters == nil) {
        return nil;
    }
    
    return [NSJSONSerialization dataWithJSONObject: _requestParmeters options: NSJSONWritingPrettyPrinted error: nil];
}


+ (instancetype)sendMessageRequestWithMobile:(NSString*)mobile {
    
    KKNetworkRequest *request = [KKNetworkRequest new];
    NSString *interface = [NSString stringWithFormat: @"/register/sendmessage"];
    request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    
    NSMutableDictionary *parmeters = [NSMutableDictionary dictionary];
    [parmeters setValue: mobile forKey: @"mobile"];
    [parmeters setValue: @"0" forKey: @"type"];
    request.requestParmeters = parmeters;
    
    return request;
}

+ (instancetype)merchantregistRequestWithMobile:(NSString*)mobile password:(NSString*)password authcode:(NSString*)authcode {
    
    KKNetworkRequest *request = [KKNetworkRequest new];
    NSString *interface = [NSString stringWithFormat: @"/register/merchantregist"];
    request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    
    NSMutableDictionary *parmeters = [NSMutableDictionary dictionary];
    [parmeters setValue: mobile forKey: @"mobile"];
    [parmeters setValue: password forKey: @"password"];
    [parmeters setValue: authcode forKey: @"authcode"];
    request.requestParmeters = parmeters;
    
    return request;
}

+ (instancetype)loginRequestWithMobile:(NSString*)mobile password:(NSString*)password {
    
    KKNetworkRequest *request = [KKNetworkRequest new];
    NSString *interface = [NSString stringWithFormat: @"/login/submit"];
    request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    
    NSMutableDictionary *parmeters = [NSMutableDictionary dictionary];
    [parmeters setValue: mobile forKey: @"mobile"];
    [parmeters setValue: password forKey: @"password"];
    request.requestParmeters = parmeters;
    
    return request;
}

+ (instancetype)storeInfoRequestWithStoreNO:(NSString*)storeNO {
    
    KKNetworkRequest *request = [KKNetworkRequest new];
    NSString *interface = [NSString stringWithFormat: @"/store/info"];
    request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    
    NSMutableDictionary *parmeters = [NSMutableDictionary dictionary];
    [parmeters setValue: storeNO forKey: @"store_no"];
    request.requestParmeters = parmeters;
    
    return request;
}

//  商户认领
+ (instancetype)storeApplystoreRequestWithUserNO:(NSString*)userNO storeNO:(NSString*)storeNO storeName:(NSString*)storeName storeAddress:(NSString*)storeAddr IDCardNO:(NSString*)IDCardNO principal:(NSString*)principal IDCardPic:(NSData*)idCardPic businessLicensePic:(NSData*)businessLicensePic {
    
    KKNetworkRequest *request = [KKNetworkRequest new];
    NSString *interface = [NSString stringWithFormat: @"/store/applystore"];
    request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    
    NSMutableDictionary *parmeters = [NSMutableDictionary dictionary];
    [parmeters setValue: storeNO forKey: @"store_no"];
    request.requestParmeters = parmeters;
    
    return request;
}

//  查询所有商户信息
+ (instancetype)storelistRequestWithSearch:(NSString*)searchText startIndex:(NSInteger)startIndex endIndex:(NSInteger)endIndex {
    KKNetworkRequest *request = [KKNetworkRequest new];
    NSString *interface = [NSString stringWithFormat: @"/store/storelist"];
    request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    
    NSMutableDictionary *parmeters = [NSMutableDictionary dictionary];
    [parmeters setValue: searchText forKey: @"search_text"];
    [parmeters setValue: @(startIndex) forKey: @"start_index"];
    [parmeters setValue: @(endIndex) forKey: @"end_index"];
    request.requestParmeters = parmeters;
    
    return request;
}

+ (instancetype)custlistRequestWithStoreNO:(NSString*)storeNO search:(NSString*)searchText startIndex:(NSInteger)startIndex endIndex:(NSInteger)endIndex {
    
    KKNetworkRequest *request = [KKNetworkRequest new];
    NSString *interface = [NSString stringWithFormat: @"/cust/list"];
    request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    
    NSMutableDictionary *parmeters = [NSMutableDictionary dictionary];
    [parmeters setValue: storeNO forKey: @"store_no"];
    [parmeters setValue: searchText forKey: @"search_text"];
    [parmeters setValue: @(startIndex) forKey: @"start_index"];
    [parmeters setValue: @(endIndex) forKey: @"end_index"];
    request.requestParmeters = parmeters;
    
    return request;
}

+ (instancetype)custInfoUpdateRequestWithStoreNO:(NSString*)storeNO custName:(NSString*)name custMobile:(NSString*)mobile custAddress:(NSString*)address custBirthDay:(NSString*)birthDay custGender:(NSString*)gender custLevel:(NSString*)level nextBachDate:(NSString*)bachDate nextHairDate:(NSString*)hairDate nextDriftDate:(NSString*)driftDate remark:(NSString*)remark custNO:(NSString*)custNO {
    
    KKNetworkRequest *request = [KKNetworkRequest new];
    
    if (custNO == nil) {
        NSString *interface = [NSString stringWithFormat: @"/cust/add"];
        request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    }
    else {
        NSString *interface = [NSString stringWithFormat: @"/cust/update"];
        request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    }
    
    NSMutableDictionary *parmeters = [NSMutableDictionary dictionary];
    [parmeters setValue: storeNO forKey: @"store_no"];
    [parmeters setValue: custNO forKey: @"cust_no"];
    [parmeters setValue: name forKey: @"cust_name"];
    [parmeters setValue: mobile forKey: @"cust_mobile"];
    [parmeters setValue: address forKey: @"cust_addr"];
    [parmeters setValue: birthDay forKey: @"cust_birthday"];
    [parmeters setValue: gender forKey: @"cust_gender"];
    [parmeters setValue: level forKey: @"cust_level"];
    [parmeters setValue: bachDate forKey: @"next_bach_date"];
    [parmeters setValue: hairDate forKey: @"next_hair_date"];
    [parmeters setValue: driftDate forKey: @"next_drift_date"];
    [parmeters setValue: remark forKey: @"remark"];
    request.requestParmeters = parmeters;
    
    return request;
}

//  批量新增客人
+ (instancetype)custBatchAddCustRequestWithStoreNO:(NSString*)storeNO custs:(NSArray*)custs {
    KKNetworkRequest *request = [KKNetworkRequest new];
    NSString *interface = [NSString stringWithFormat: @"/cust/batch_add_cust"];
    request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    
    NSMutableDictionary *parmeters = [NSMutableDictionary dictionary];
    [parmeters setValue: storeNO forKey: @"store_no"];
    [parmeters setValue: custs forKey: @"custs"];
    
//    cust_name	客户姓名	字符串	必须
//    cust_mobile
    request.requestParmeters = parmeters;
    
    return request;
}

+ (instancetype)custDeleteRequestWithStoreNO:(NSString*)storeNO custNO:(NSString*)custNO {
    KKNetworkRequest *request = [KKNetworkRequest new];
    NSString *interface = [NSString stringWithFormat: @"/cust/delete"];
    request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    
    NSMutableDictionary *parmeters = [NSMutableDictionary dictionary];
    [parmeters setValue: storeNO forKey: @"store_no"];
    [parmeters setValue: custNO forKey: @"cust_no"];
    request.requestParmeters = parmeters;
    
    return request;
}

+ (instancetype)custPetlistRequestWithStoreNO:(NSString*)storeNO custNO:(NSString*)custNO {
    KKNetworkRequest *request = [KKNetworkRequest new];
    NSString *interface = [NSString stringWithFormat: @"/cust/petlist"];
    request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    
    NSMutableDictionary *parmeters = [NSMutableDictionary dictionary];
    [parmeters setValue: storeNO forKey: @"store_no"];
    [parmeters setValue: custNO forKey: @"cust_no"];
    request.requestParmeters = parmeters;
    
    return request;
}

+ (instancetype)custUpdatePetInfoRequestWithStoreNO:(NSString*)storeNO custNO:(NSString*)custNO petName:(NSString*)name petCategory:(NSString*)category petSize:(NSString*)size petWeight:(NSString*)weight petAge:(NSString*)age isDirift:(NSString*)dirift isVaccine:(NSString*)vaccine remark:(NSString*)remark petNO:(NSString*)petNO {
    
    KKNetworkRequest *request = [KKNetworkRequest new];
    
    if (petNO == nil) {
        NSString *interface = [NSString stringWithFormat: @"/cust/addpet"];
        request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    }
    else {
        NSString *interface = [NSString stringWithFormat: @"/cust/updatepet"];
        request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    }
    
    NSMutableDictionary *parmeters = [NSMutableDictionary dictionary];
    [parmeters setValue: storeNO forKey: @"store_no"];
    [parmeters setValue: custNO forKey: @"cust_no"];
    [parmeters setValue: petNO forKey: @"pet_no"];
    [parmeters setValue: name forKey: @"pet_name"];
    [parmeters setValue: category forKey: @"pet_category"];
    [parmeters setValue: size forKey: @"pet_size"];
    [parmeters setValue: weight forKey: @"pet_weight"];
    [parmeters setValue: age forKey: @"pet_age"];
    [parmeters setValue: dirift forKey: @"is_dirift"];
    [parmeters setValue: vaccine forKey: @"is_vaccine"];
    [parmeters setValue: remark forKey: @"remark"];
    request.requestParmeters = parmeters;
    
    return request;
}

+ (instancetype)custDeletePetRequestWithStoreNO:(NSString*)storeNO custNO:(NSString*)custNO petNO:(NSString*)petNO {
    KKNetworkRequest *request = [KKNetworkRequest new];
    NSString *interface = [NSString stringWithFormat: @"/cust/deletepet"];
    request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    
    NSMutableDictionary *parmeters = [NSMutableDictionary dictionary];
    [parmeters setValue: storeNO forKey: @"store_no"];
    [parmeters setValue: custNO forKey: @"cust_no"];
    [parmeters setValue: petNO forKey: @"pet_no"];
    request.requestParmeters = parmeters;
    
    return request;
}

+ (instancetype)custDetailInfoRequestWithStoreNO:(NSString*)storeNO custNO:(NSString*)custNO {
    
    KKNetworkRequest *request = [KKNetworkRequest new];
    NSString *interface = [NSString stringWithFormat: @"/cust/detailinfo"];
    request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    
    NSMutableDictionary *parmeters = [NSMutableDictionary dictionary];
    [parmeters setValue: storeNO forKey: @"store_no"];
    [parmeters setValue: custNO forKey: @"cust_no"];
    request.requestParmeters = parmeters;
    
    return request;
}

+ (instancetype)custbirthdaylistRequestWithStoreNO:(NSString*)storeNO startDate:(NSString*)startDate endDate:(NSString*)endDate startIndex:(NSInteger)startIndex endIndex:(NSInteger)endIndex {
    KKNetworkRequest *request = [KKNetworkRequest new];
    NSString *interface = [NSString stringWithFormat: @"/system/custbirthdaylist"];
    request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    
    NSMutableDictionary *parmeters = [NSMutableDictionary dictionary];
    [parmeters setValue: storeNO forKey: @"store_no"];
    [parmeters setValue: startDate forKey: @"start_date"];
    [parmeters setValue: endDate forKey: @"end_date"];
    [parmeters setValue: @(startIndex) forKey: @"start_index"];
    [parmeters setValue: @(endIndex) forKey: @"end_index"];
    request.requestParmeters = parmeters;
    
    return request;
}

+ (instancetype)custbachlistRequestWithStoreNO:(NSString*)storeNO startDate:(NSString*)startDate endDate:(NSString*)endDate startIndex:(NSInteger)startIndex endIndex:(NSInteger)endIndex {
    KKNetworkRequest *request = [KKNetworkRequest new];
    NSString *interface = [NSString stringWithFormat: @"/system/custbachlist"];
    request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    
    NSMutableDictionary *parmeters = [NSMutableDictionary dictionary];
    [parmeters setValue: storeNO forKey: @"store_no"];
    [parmeters setValue: startDate forKey: @"start_date"];
    [parmeters setValue: endDate forKey: @"end_date"];
    [parmeters setValue: @(startIndex) forKey: @"start_index"];
    [parmeters setValue: @(endIndex) forKey: @"end_index"];
    request.requestParmeters = parmeters;
    
    return request;
}

+ (instancetype)custAcctountBalanceHistoryWithStoreNO:(NSString*)storeNO custNO:(NSString*)custNO startIndex:(NSInteger)startIndex endIndex:(NSInteger)endIndex {
    
    KKNetworkRequest *request = [KKNetworkRequest new];
    NSString *interface = [NSString stringWithFormat: @"/system/cust_acct_balance_his"];
    request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    
    NSMutableDictionary *parmeters = [NSMutableDictionary dictionary];
    [parmeters setValue: storeNO forKey: @"store_no"];
    [parmeters setValue: custNO forKey: @"cust_no"];
    [parmeters setValue: @(startIndex) forKey: @"start_index"];
    [parmeters setValue: @(endIndex) forKey: @"end_index"];
    request.requestParmeters = parmeters;
    
    return request;
}

//  查询商品列表
+ (instancetype)goodsListRequestWithStoreNO:(NSString*)storeNO search:(NSString*)searchText startIndex:(NSInteger)startIndex endIndex:(NSInteger)endIndex {
    KKNetworkRequest *request = [KKNetworkRequest new];
    NSString *interface = [NSString stringWithFormat: @"/goods/list"];
    request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    
    NSMutableDictionary *parmeters = [NSMutableDictionary dictionary];
    [parmeters setValue: storeNO forKey: @"store_no"];
    [parmeters setValue: searchText forKey: @"search_text"];
    [parmeters setValue: @(startIndex) forKey: @"start_index"];
    [parmeters setValue: @(endIndex) forKey: @"end_index"];
    request.requestParmeters = parmeters;
    
    return request;
}

+ (instancetype)selecTableListRequestWithStoreNO:(NSString*)storeNO search:(NSString*)searchText {
    KKNetworkRequest *request = [KKNetworkRequest new];
    NSString *interface = [NSString stringWithFormat: @"/goods/selectable_list"];
    request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    
    NSMutableDictionary *parmeters = [NSMutableDictionary dictionary];
    [parmeters setValue: storeNO forKey: @"store_no"];
    [parmeters setValue: searchText forKey: @"search_text"];
    request.requestParmeters = parmeters;
    
    return request;
}

+ (instancetype)goodsDetailInfoRequestWithStoreNO:(NSString*)storeNO prodNO:(NSString*)prod_no {
    KKNetworkRequest *request = [KKNetworkRequest new];
    NSString *interface = [NSString stringWithFormat: @"/goods/detailInfo"];
    request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    
    NSMutableDictionary *parmeters = [NSMutableDictionary dictionary];
    [parmeters setValue: storeNO forKey: @"store_no"];
    [parmeters setValue: prod_no forKey: @"prod_no"];
    request.requestParmeters = parmeters;
    
    return request;
}

+ (instancetype)goodsEditRequestWithStoreNO:(NSString*)storeNO name:(NSString*)name pinyin:(NSString*)pinyin price:(NSString*)price cost:(NSString*)cost categoryNO:(NSString*)categoryNO status:(NSString*)status desc:(NSString*)desc size:(NSString*)size image:(NSData*)image prodNO:(NSString*)prod_no {
    
    KKNetworkRequest *request = [KKNetworkRequest new];
    
    if (prod_no == nil) {
        NSString *interface = [NSString stringWithFormat: @"/goods/add"];
        request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    }
    else {
        NSString *interface = [NSString stringWithFormat: @"/goods/edit"];
        request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    }
    
    NSMutableDictionary *parmeters = [NSMutableDictionary dictionary];
    [parmeters setValue: storeNO forKey: @"store_no"];
    [parmeters setValue: name forKey: @"prod_name"];
    [parmeters setValue: pinyin forKey: @"prod_pinyin"];
    [parmeters setValue: price forKey: @"prod_price"];
    [parmeters setValue: cost forKey: @"prod_cost"];
    [parmeters setValue: categoryNO forKey: @"prod_category_no"];
    [parmeters setValue: status forKey: @"prod_status"];
    [parmeters setValue: desc forKey: @"prod_desc"];
    [parmeters setValue: size forKey: @"prod_size"];
    [parmeters setValue: image forKey: @"prod_image"];
    [parmeters setValue: prod_no forKey: @"prod_no"];
    request.requestParmeters = parmeters;
    
    return request;
}

+ (instancetype)goodsDeleteRequestWithStoreNO:(NSString*)storeNO prodNO:(NSString*)prod_no {
    KKNetworkRequest *request = [KKNetworkRequest new];
    NSString *interface = [NSString stringWithFormat: @"/goods/delete"];
    request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    
    NSMutableDictionary *parmeters = [NSMutableDictionary dictionary];
    [parmeters setValue: storeNO forKey: @"store_no"];
    [parmeters setValue: prod_no forKey: @"prod_no"];
    request.requestParmeters = parmeters;
    
    return request;
}

+ (instancetype)goodsCategoryListRequest {
    KKNetworkRequest *request = [KKNetworkRequest new];
    NSString *interface = [NSString stringWithFormat: @"/goods/categorylist"];
    request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    return request;
}

+ (instancetype)orderAddRequestWithStoreNO:(NSString*)storeNO transDate:(NSString*)date custNO:(NSString*)custNO orderType:(NSString*)orderType totalAmt:(NSString*)totalAmt payedAmt:(NSString*)payedAmt remark:(NSString*)remark userNO:(NSString*)userNO orderDetails:(NSArray*)orderDetails orderPayments:(NSArray*)orderPayments {
    
    KKNetworkRequest *request = [KKNetworkRequest new];
    NSString *interface = [NSString stringWithFormat: @"/order/add"];
    request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    
    NSMutableDictionary *parmeters = [NSMutableDictionary dictionary];
    [parmeters setValue: storeNO forKey: @"store_no"];
    [parmeters setValue: date forKey: @"trans_date"];
    [parmeters setValue: custNO forKey: @"cust_no"];
    [parmeters setValue: orderType forKey: @"order_type"];
    [parmeters setValue: totalAmt forKey: @"total_amt"];
    [parmeters setValue: payedAmt forKey: @"payed_amt"];
    [parmeters setValue: remark forKey: @"remark"];
    [parmeters setValue: userNO forKey: @"user_no"];
    [parmeters setValue: orderDetails forKey: @"order_details"];
    [parmeters setValue: orderPayments forKey: @"order_payments"];
    request.requestParmeters = parmeters;
    
    return request;
}

+ (instancetype)orderCancelOrderRequestWithStoreNO:(NSString*)storeNO orderNO:(NSString*)orderNO {
    
    KKNetworkRequest *request = [KKNetworkRequest new];
    NSString *interface = [NSString stringWithFormat: @"/order/CancelOrder"];
    request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    
    NSMutableDictionary *parmeters = [NSMutableDictionary dictionary];
    [parmeters setValue: storeNO forKey: @"store_no"];
    [parmeters setValue: orderNO forKey: @"order_no"];
    request.requestParmeters = parmeters;
    
    return request;
}

+ (instancetype)orderListRequestWithStoreNO:(NSString*)storeNO startDate:(NSString*)startDate endDate:(NSString*)endDate startIndex:(NSInteger)startIndex endIndex:(NSInteger)endIndex {
    
    KKNetworkRequest *request = [KKNetworkRequest new];
    NSString *interface = [NSString stringWithFormat: @"/order/OrderList"];
    request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    
    NSMutableDictionary *parmeters = [NSMutableDictionary dictionary];
    [parmeters setValue: storeNO forKey: @"store_no"];
    [parmeters setValue: startDate forKey: @"start_date"];
    [parmeters setValue: endDate forKey: @"end_date"];
    [parmeters setValue: @(startIndex) forKey: @"start_index"];
    [parmeters setValue: @(endIndex) forKey: @"end_index"];
    request.requestParmeters = parmeters;
    
    return request;
}

+ (instancetype)orderAcctBalanceHistoryRequestWithStoreNO:(NSString*)storeNO custNO:(NSString*)custNO startDate:(NSString*)startDate endDate:(NSString*)endDate startIndex:(NSInteger)startIndex endIndex:(NSInteger)endIndex {
    
    KKNetworkRequest *request = [KKNetworkRequest new];
    NSString *interface = [NSString stringWithFormat: @"/order/acct_balance_his"];
    request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    
    NSMutableDictionary *parmeters = [NSMutableDictionary dictionary];
    [parmeters setValue: storeNO forKey: @"store_no"];
    [parmeters setValue: custNO forKey: @"cust_no"];
    [parmeters setValue: startDate forKey: @"start_date"];
    [parmeters setValue: endDate forKey: @"end_date"];
    [parmeters setValue: @(startIndex) forKey: @"start_index"];
    [parmeters setValue: @(endIndex) forKey: @"end_index"];
    request.requestParmeters = parmeters;
    
    return request;
}

+ (instancetype)sytemPaymentListRequest {
    
    KKNetworkRequest *request = [KKNetworkRequest new];
    NSString *interface = [NSString stringWithFormat: @"/system/paymentlist"];
    request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    return request;
}

+ (instancetype)systemUploadfileWithCode:(NSString*)code fileType:(NSString*)fileType fileData:(NSData*)fileData fileName:(NSString*)fileName {
    
    KKNetworkRequest *request = [KKNetworkRequest new];
    NSString *interface = [NSString stringWithFormat: @"/system/uploadfile"];
    request.requestURL = [NSString stringWithFormat: @"%@%@",request.requestURL, interface];
    
    NSMutableDictionary *parmeters = [NSMutableDictionary dictionary];
    [parmeters setValue: code forKey: @"code"];
    [parmeters setValue: fileType forKey: @"file_type"];
    [parmeters setValue: fileData forKey: @"file_data"];
    [parmeters setValue: fileName forKey: @"file_name"];
    request.requestParmeters = parmeters;
    
    return request;
    
}

@end
